package com.bort.system.model;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.util.List;

@Data
@TableName("role")
public class Role {

    @TableId("id")
    private Integer id;

    @TableField("role_name")
    private String roleName;

    @TableField("status")
    private Byte status;

    @TableField("description")
    private String description;

    @TableField(exist = false)
    private List<RoleMenu> roleMenus;

    public void setRoleName(String roleName) {
        this.roleName = roleName == null ? null : roleName.trim();
    }

    public void setDescription(String description) {
        this.description = description == null ? null : description.trim();
    }
}